<?php
/**
 * Created by PhpStorm.
 * Author: ls
 * Time: 2023/9/26 10:04
 * Desc: 会员折扣
 */
class Request_Api_V2_Member_Discount extends Request_Api_V2_Base
{
    public function __construct($request_param)
    {
        parent::__construct($request_param);

        //自定义规则
        $this->validation->rule('mid',array('Rule_Member','need_member'));
    }

    public function get_discount()
    {
        $this->rules = [
            ['type_id',  ['not_empty', 'digit', $this->rule_min(1)]],
            ['product_id', ['not_empty']],
        ];

        return $this;
    }
}